var padDate = function(value){
  return value < 10 ? '0' + value : value;
};
setInterval(current,1000)
function current() {
  var date = new Date();
  var year = date.getFullYear();
  var month = padDate(date.getMonth()+1);
  var day = padDate(date.getDate());
  var hours = padDate(date.getHours());
  var minutes =padDate(date.getMinutes());
  var seconds = padDate(date.getSeconds());
  $('#current').text(year+"-"+month+"-"+day+"-   "+hours+":"+minutes)
  $('nav div .time').text(hours+":"+minutes+':'+seconds)
}
